<!--
  Copyright (c) chb my copyright message. 2022-2023. All rights reserved.

  -->

<template>
  <div>
    <!-- 头部导航栏   -->
    <van-nav-bar>
      <template #left>
        <van-icon name="zuojiantou" class-prefix="iconfont" size="26px" @click="$router.back()"></van-icon>
        <p style="font-size: 18px">编辑歌单信息</p>
      </template>
    </van-nav-bar>
    <van-cell-group>
      <van-cell title="更换封面">
        <template #right-icon>
          <van-uploader v-model="fileList" multiple :after-read="afterRead"/>
        </template>
      </van-cell>
      <van-field v-model="playlist.name" label="名称"/>
      <van-cell title="标签">
        <template #right-icon>
          <div v-for="(item,index) in playlist.tags" :key="index">
            <span style="margin-right: 5px;border-radius: 5px;font-size: 12px;border: 1px solid #999;padding: 4px">{{
                item.toString()
              }}</span>
          </div>
        </template>
      </van-cell>
      <van-field v-model="playlist.desc" label="描述"/>
    </van-cell-group>
  </div>
</template>

<script>
export default {
  name: "updatePlayList",
  data() {
    return {
      playlist: this.$route.query,
      fileList: []
    }
  },
  created() {
    console.log(this.playlist)
  },
  methods: {
    afterRead(file) {
      console.log(file)
    }
  }
}
</script>

<style scoped>

</style>
